<html>
<head><meta charset="utf-8"><title>LLVM LSR bug triggered by Rust range code #74498 · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/LLVM.20LSR.20bug.20triggered.20by.20Rust.20range.20code.20.2374498.html">LLVM LSR bug triggered by Rust range code #74498</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="205914618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/LLVM%20LSR%20bug%20triggered%20by%20Rust%20range%20code%20%2374498/near/205914618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/LLVM.20LSR.20bug.20triggered.20by.20Rust.20range.20code.20.2374498.html#205914618">(Aug 04 2020 at 14:37)</a>:</h4>
<p>hey <span class="user-mention" data-user-id="119581">@mati865</span> , since I happened to see you in that other topic</p>



<a name="205914675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/LLVM%20LSR%20bug%20triggered%20by%20Rust%20range%20code%20%2374498/near/205914675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/LLVM.20LSR.20bug.20triggered.20by.20Rust.20range.20code.20.2374498.html#205914675">(Aug 04 2020 at 14:37)</a>:</h4>
<p>I noticed your <span aria-label="confused" class="emoji emoji-1f615" role="img" title="confused">:confused:</span> ("confused") emoji <a href="https://github.com/rust-lang/rust/issues/74498#issuecomment-667452406">here</a></p>



<a name="205914730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/LLVM%20LSR%20bug%20triggered%20by%20Rust%20range%20code%20%2374498/near/205914730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/LLVM.20LSR.20bug.20triggered.20by.20Rust.20range.20code.20.2374498.html#205914730">(Aug 04 2020 at 14:38)</a>:</h4>
<p>I thought maybe you had some feedback I should listen to?</p>



<a name="205914767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/LLVM%20LSR%20bug%20triggered%20by%20Rust%20range%20code%20%2374498/near/205914767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/LLVM.20LSR.20bug.20triggered.20by.20Rust.20range.20code.20.2374498.html#205914767">(Aug 04 2020 at 14:38)</a>:</h4>
<p>(or was that just your way of saying "we should not be working around LLVM bugs; we should be fixing LLVM bugs." ? Which I essentially agree with.)</p>



<a name="205914847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/LLVM%20LSR%20bug%20triggered%20by%20Rust%20range%20code%20%2374498/near/205914847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mati865 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/LLVM.20LSR.20bug.20triggered.20by.20Rust.20range.20code.20.2374498.html#205914847">(Aug 04 2020 at 14:39)</a>:</h4>
<p>I don't think it's good to apply workaround for bugs affecting just one platform to other platforms</p>



<a name="205914970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/LLVM%20LSR%20bug%20triggered%20by%20Rust%20range%20code%20%2374498/near/205914970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mati865 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/LLVM.20LSR.20bug.20triggered.20by.20Rust.20range.20code.20.2374498.html#205914970">(Aug 04 2020 at 14:40)</a>:</h4>
<p>But if it really is an overflow then this time it might the be right solution</p>



<a name="205915486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/LLVM%20LSR%20bug%20triggered%20by%20Rust%20range%20code%20%2374498/near/205915486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/LLVM.20LSR.20bug.20triggered.20by.20Rust.20range.20code.20.2374498.html#205915486">(Aug 04 2020 at 14:43)</a>:</h4>
<p>after reading the code again, I don't see how the overflow could be happening there from Rust's end</p>



<a name="205915617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/LLVM%20LSR%20bug%20triggered%20by%20Rust%20range%20code%20%2374498/near/205915617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/LLVM.20LSR.20bug.20triggered.20by.20Rust.20range.20code.20.2374498.html#205915617">(Aug 04 2020 at 14:44)</a>:</h4>
<p>I'm currently assuming that <em>other</em> LLVM optimizations are introducing it, but I have not confirmed that. (That, or the problematic Rust code was not correctly identified.)</p>



<a name="205915670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/LLVM%20LSR%20bug%20triggered%20by%20Rust%20range%20code%20%2374498/near/205915670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/LLVM.20LSR.20bug.20triggered.20by.20Rust.20range.20code.20.2374498.html#205915670">(Aug 04 2020 at 14:45)</a>:</h4>
<p>anyway, I basically agree with your point</p>



<a name="205916559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/LLVM%20LSR%20bug%20triggered%20by%20Rust%20range%20code%20%2374498/near/205916559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mati865 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/LLVM.20LSR.20bug.20triggered.20by.20Rust.20range.20code.20.2374498.html#205916559">(Aug 04 2020 at 14:51)</a>:</h4>
<p>I didn't mean to attack you or anything, the comment seemed to me like <code>unchecked_add</code> would avoided on all targets which I don't think is right.</p>



<a name="205917197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/LLVM%20LSR%20bug%20triggered%20by%20Rust%20range%20code%20%2374498/near/205917197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/LLVM.20LSR.20bug.20triggered.20by.20Rust.20range.20code.20.2374498.html#205917197">(Aug 04 2020 at 14:56)</a>:</h4>
<p>Oh, I didn't think it was an attack. <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span> . I just wanted clarification</p>



<a name="205917345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/LLVM%20LSR%20bug%20triggered%20by%20Rust%20range%20code%20%2374498/near/205917345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/LLVM.20LSR.20bug.20triggered.20by.20Rust.20range.20code.20.2374498.html#205917345">(Aug 04 2020 at 14:57)</a>:</h4>
<p>(in general I feel like github emoticons end up causing confusion in majority of cases, except for when people e.g. say "this is a poll, click X or Y to indicate your answers." And yet I probably use them too at times.)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>